<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>二维码开票</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="icon" href="favicon.ico">
  <link rel="stylesheet" type="text/css" href="css/info.css">
  <style>
    .button {
      background-color: #008CBA;
      border: none;
      color: white;
      padding: 15px 32px;
      text-align: center;
      text-decoration: none;
      display: inline-block;
      font-size: 16px;
      width: 130px;
    }

    .preview {
      margin-top: 10px;
      text-align: center;
    }

    .content {
      margin-top: 10px;
    }

  </style>
</head>

<body>
<div class="title">
  <h1>发票开具中</h1>
</div>
<div>
  <p class="preview">预览发票</p>
</div>
<div class="content">
  <p><a id="pdfUrl" class="button" href="">下载电子发票PDF</a></p>
  <p><a id="save" class="button" href="">保存图片</a></p>
</div>
<script src="js/flexible.js"></script>
<script src="js/index.js"></script>
<script></script>
<script>
  document.getElementById("pdfUrl").href = this.getQueryString("pdfUrl");

  // 获取地址栏URL参数
  function getQueryString(name) {
    let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    let r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]);
    return null;
  }

</script>
</body>

</html>
